<div id="wrapper">
    <div id="page-wrapper">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"></h3>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12">
                        <form id="goodsform" class="form-horizontal " role="form">
                            <fieldset>
                                <legend></legend>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label" for="goods_name"><span>商品名称</span></label>

                                    <div class="col-sm-3  ">
                                        <input class="form-control" id="goods_name" name="goods_name" type="text"
                                               placeholder="必填，请勿使用特殊字符"/>
                                    </div>
                                    <label class="col-sm-1 control-label" for="brand_id">商品品牌</label>

                                    <div class="col-sm-3">

                                        <select id="brand_id" name="brand_id" class="form-control">
                                            {%notempty name="data['brand']"%}
                                            {%volist name="data['brand']" id="vo"%}
                                            <option value={%$vo['brand_id']%}>{%$vo['brand_name']%}</option>
                                            {%/volist%}
                                            {%/notempty%}
                                        </select>

                                    </div>

                                    <label class="col-sm-1 control-label" for="sort_order">商品排序</label>

                                    <div class="col-sm-3">
                                        <input class="form-control" id="sort_order" name="sort_order" type="text"
                                               placeholder="小数点保留2位"/>
                                    </div>
                                </div>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label " for="goods_number">商品数量</label>

                                    <div class="col-sm-3  ">
                                        <input class="form-control" id="goods_number" name="goods_number" type="text"
                                               placeholder="使用整数"/>
                                    </div>
                                    <label class="col-sm-1 control-label" for="market_price">市场价格</label>

                                    <div class="col-sm-3">
                                        <input class="form-control" id="market_price" name="market_price" type="text"
                                               placeholder="小数点保留2位"/>
                                    </div>
                                    <label class="col-sm-1 control-label" for="shop_price">商城价格</label>

                                    <div class="col-sm-3">
                                        <input class="form-control" id="shop_price" name="shop_price" type="text"
                                               placeholder="小数点保留2位"/>
                                    </div>
                                </div>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label " for="is_on_sale">是否在售</label>

                                    <div class="col-sm-3  ">
                                        <select id="is_on_sale" name="is_on_sale" class="form-control">
                                            <option value="1">是</option>
                                            <option value="0">否</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label" for="is_hot">是否热卖</label>

                                    <div class="col-sm-3">
                                        <select id="is_hot" name="is_hot" class="form-control">
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label" for="is_new">是否新品</label>

                                    <div class="col-sm-3">
                                        <select id="is_new" name="is_new" class="form-control">
                                            <option value="1">是</option>
                                            <option value="0">否</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label " for="is_promote">是否促销</label>

                                    <div class="col-sm-3  ">
                                        <select id="is_promote" name="is_promote" class="form-control">
                                            <option value="1">是</option>
                                            <option value="0">否</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label" for="is_certified">是否正品</label>

                                    <div class="col-sm-3">
                                        <select id="is_certified" name="is_certified" class="form-control">
                                            <option value="1">是</option>
                                            <option value="0">否</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label" for="is_free_shipping">是否包邮</label>

                                    <div class="col-sm-3">
                                        <select id="is_free_shipping" name="is_free_shipping" class="form-control">
                                            <option value="1">是</option>
                                            <option value="0">否</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label " for="is_special_packing">特殊包装</label>

                                    <div class="col-sm-3  ">
                                        <select id="is_special_packing" name="is_special_packing" class="form-control">
                                            <option value="1">是</option>
                                            <option value="0">否</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">商品分类</label>

                                    <div class="col-sm-3">
                                        <select name="cat_id" class="form-control col-md-10" id="cat_id"></select>
                                    </div>
                                    <label class="col-sm-1 control-label" for="shop_price">邮费</label>

                                    <div class="col-sm-3">
                                        <input class="form-control" id="shipping_fee" name="shipping_fee" type="text"
                                               placeholder="小数点保留2位"/>
                                    </div>
                                </div>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label " for="keywords">关键字</label>

                                    <div class="col-sm-3  ">
                                        <input class="form-control" id="keywords" name="keywords" type="text"
                                               placeholder="商品关键字"/>
                                    </div>
                                    <label class="col-sm-1 control-label" for="goods_brief">简介</label>

                                    <div class="col-sm-3">
                                        <input class="form-control" id="goods_brief" name="goods_brief" type="text"
                                               placeholder="商品简介"/>
                                    </div>
                                    <button type="button" class="btn btn-primary col-md-1" data-toggle="modal"
                                            data-target="#addspec">
                                        增加规格
                                    </button>
                                </div>
                                <input id="specs" name="specs" style="display:none">

                                <div id='spec_content'>
                                </div>
                            </fieldset>
                            <fieldset>
                                <legend></legend>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label">商品详情图</label>
                                    <input id="goods_desc" name="goods_desc" type="text" style="display:none;">

                                    <div class="col-sm-11">
                                        <input id="goods_desc_file" name="file" type="file" multiple
                                               class="file-loading">
                                    </div>
                                </div>
                            </fieldset>
                            <fieldset>
                                <legend></legend>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label">商品缩略图</label>
                                    <input id="goods_thumb" name="goods_thumb" type="text" style="display: none;">

                                    <div class="col-sm-11">
                                        <input id="goods_thumb_file" name="file" type="file" multiple
                                               class="file-loading">
                                    </div>
                                </div>
                            </fieldset>
                            <fieldset>
                                <legend></legend>
                                <div class="form-group ms-col-input">
                                    <label class="col-sm-1 control-label">商品轮播图</label>
                                    <input id="goods_img" name="goods_img" type="text" style="display: none;">

                                    <div class="col-sm-11">
                                        <input id="goods_img_file" name="file" type="file" multiple
                                               class="file-loading">
                                    </div>
                                </div>
                            </fieldset>
                            <fieldset>
                                <legend></legend>
                                <div class="form-group">
                                </div>
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel-footer">
            <div class="row">
                <div class="col-md-1 col-md-offset-5">
                    <button id="confirm" class="btn btn-primary btn-lg">提交</button>
                </div>
            </div>

        </div>
    </div>
</div>
<div class="modal fade" id="addspec" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div id="addspec" class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">增加规格</h4>
            </div>
            <div class="modal-body">
                <form id="spec_form" class="form-horizontal" role="form" enctype="multipart/form-data">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">名称</label>

                        <div class="col-sm-10">
                            <input id='spec_name' type="text" class="form-control" placeholder="例如：颜色">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">数量</label>

                        <div class="col-sm-10">
                            <input id='spec_goods_number' type="text" class="form-control" placeholder="例如：100">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">价格</label>

                        <div class="col-sm-10">
                            <input id='spec_price' type="text" class="form-control"
                                   placeholder="例如：99.99">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button id="close" type="button" class="btn btn-primary" data-dismiss="modal">关闭
                </button>
                <button id="spec_confirm" type="button" class="btn btn-primary">提交</button>
            </div>
        </div>
    </div>
</div>
</div>
<script src="/static/home/widget/shop/addgoods/addgoods.js"></script>



